<template>
    <div class="page-wrap">
        <logo></logo>
        <search class="search-cpt"></search>
        <div class="page-text">{{page}} Page</div>
        <!--<div>{{ $t("Settings.settings") }}</div>
        <button @click="changeLanguage">change language</button>-->
    </div>
</template>

<script setup>
    import {onBeforeMount} from 'vue'
    import {sendMsg, addListenerMsg} from "/src/utils"
    //import { useI18n } from "vue-i18n"
    //import chat from "/src/components/chat.vue"
    import logo from "/src/components/logo.vue"
    import search from "/src/components/search.vue"

    //const { locale } = useI18n({ useScope: "global" });

    let page = "override"

    // function changeLanguage() {
    //     locale.value = "en-US" // 切换成英文
    // }

    onBeforeMount(() => {
        sendMsg({
            page: page,
            cmd: "in"
        })

        addListenerMsg((request, sender, sendResponse) => {
            console.log('override request', request)
        })
    })

</script>

<style lang="less">
    .page-wrap {
        width: 100vw;
        height: 100vh;
        display: flex;
        flex-direction: column;
        align-items: center;
        justify-content: center;

        .search-cpt {
            margin-top: 20px;
        }

        .page-text {
            font-size: 16px;
            margin-top: 30px;
        }
    }
</style>